<template>
	<view class="img" :style="{'background-image': 'url('+detail.imgCertificate+')'}" >
			<view></view>
	</view>
</template>

<script>
	import { base64ToPath } from '@/uni_modules/sp-html2canvas-render/components/sp-html2canvas-render/util.js'
	import indexConfig from '@/config/index.config';
	export default {
		data() {
			return {	
				 domain:indexConfig.baseUrl, /* 根域名不同 */
				 detail:{}
			}
		},
	
		onShow() {
			
		},
		onLoad(options) {
		  var that = this
				this.id = options.id ? options.id : '';
		  // that.toDrawCanvas()
			// that.auto()
			this.init();
		},
		methods: {
			async getDetail() {
				let _this = this
							await this.$http
								.get(_this.domain+"/member-api/webpage/get/"+_this.id, {
								})
								.then(r => {
			
									_this.detail = r.data;
									uni.setNavigationBarTitle({
									  title: _this.detail.title // 设置为你想要显示的标题
									});
														
					
								})
								.catch(() => {
						
								});
			},
			init() {
				this.getDetail();
			},
			
		}
	}
</script>

<style lang="scss">
	page {
	 background:#ffffff
	}
	.img {
		// background-image: url('/static/images/zxzm.jpg');
		background-position: top center; 
		background-size: 100%;
		background-repeat: no-repeat;
		min-height: 100vh;
		width:100%;
		padding-bottom:15px;
	}	
	// .img:before{content: ""; display: block; padding-top: 100%;}
</style>